home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magazyn Click 1 (Special Issue)
/
fantasy.iso
/
Demo The Druid King
/
DemoMap.pak
/
SEQUENCES_S01_FIND_OGOX.VS
< prev
next >
Wrap
Text File
|
2001-04-11
|
2KB
|
67 lines
//void
//this is a side-questl; it places an additional hero who when found joins the army
NamedObj Ogox, Keltill;
Conversation conv;
ObjList temp;
int i;
while (EnvReadInt("/Note1") == 0) Sleep(1000); // we'll place Ogox when Keltill needs him
Ogox = CreateNamedObj("Ogox", PlaceEx("Ogox",5800,11200, 4));
Ogox.obj.Damage(Ogox.obj.maxhealth/4);
Keltill = GetNamedObj("Keltill");
Ogox.obj.AddCommand(true, "move", point(5500, 11500));
Ogox.obj.KillCommand();
while (1) {
if ( Dist( Keltill.obj.pos, Ogox.obj.pos) < 300 ) break;
//if ( EnvReadInt("/s01/OgoxThreadDie") == 1) return;
Sleep(500);
}
conv.Init("DM C18", 1, 0);
conv.Run();
if (EnvReadString("/DM C18/Return Value") == "OgoxFight") {
temp = Keltill.obj.AsHero.army;
for (i=0; i<temp.Count(); i+=1) temp[i].SetPlayer(4);
Ogox.obj.SetPlayer(5);
PlayersAlly(4,5);
Keltill.obj.AsHero.DetachArmy();
while (1) {
if (Ogox.obj.health < Ogox.obj.maxhealth/2) break;
Sleep(300);
}
Ogox.obj.SetPlayer(1);
Sleep(200);
conv.Init("DM C19", 1, 0);
conv.Run();
if (EnvReadString("/DM C19/Return Value") == "OgoxDie") {
Ogox.obj.SetPlayer(5);
while (!Ogox.IsDead()) Sleep(500);
}
for (i=0; i<temp.Count(); i+=1) temp[i].SetPlayer(1);
AddCommandMultiple(temp, true, "attach", Keltill.obj);
KillCommandMultiple(temp);
} else {
Ogox.obj.SetPlayer(1);
}
EnvWriteInt("/Note1",0);
if (!Ogox.IsDead()) {
EnvWriteInt("/s01/OgoxFound", 1);
EnvWriteInt("/NewNote", 11);
Run("currentmap/mission_notes.vs");
//wait for Ogox to be healed and remove notice
while (1) {
if (Ogox.obj.health == Ogox.obj.maxhealth) {
EnvWriteInt("/Note11", 0);
break;
}
Sleep(1000);
}
}